package com.litchi.tutor.controller;

import com.litchi.tutor.common.base.ResponseVO;
import com.litchi.tutor.common.entity.College;
import com.litchi.tutor.service.CollegeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author XuRuiPeng
 * @date 2021/11/1 16:56
 */
@RestController
@Api("高校管理")
@RequestMapping("/college")
public class CollegeController {

    @Autowired
    CollegeService collegeService;

    @ApiOperation("获取高校")
    @RequestMapping(value = "/getCollege", method = RequestMethod.GET)
    public ResponseVO getCollege() {
        List<College> list = collegeService.getCollege();
        return ResponseVO.ok(list);
    }
}
